package com.javastudy;

import java.util.Scanner;

import org.junit.Test;

public class Test03 {
	@Test
	public void  random() {
		
		int i=(int) (Math.random()*100);
		while (true) {
			Scanner scanner = new Scanner(System.in);
			System.out.println("请输入0~100之间的数值：");
			int temp = scanner.nextInt();
			if(i>temp){
				System.out.println("您输入的数值低了，请再次输入：");
				
			}else if(i < temp){
				System.out.println("你输入的数值高了，请再次输入：");
			
			}else {
				System.out.println("恭喜您！会回答正确！");
			}
			
			
		}
	}

}